package com.oa.xinxi.dao;

import com.oa.xinxi.entity.AuthRolesKey;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;

public interface AuthRolesMapper {
    @Delete({
        "delete from auth_roles",
        "where roles_id = #{rolesId,jdbcType=INTEGER}",
          "and auth_id = #{authId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(AuthRolesKey key);

    @Insert({
        "insert into auth_roles (roles_id, auth_id)",
        "values (#{rolesId,jdbcType=INTEGER}, #{authId,jdbcType=INTEGER})"
    })
    int insert(AuthRolesKey record);

    @InsertProvider(type=AuthRolesSqlProvider.class, method="insertSelective")
    int insertSelective(AuthRolesKey record);
}